import { getPlaylistCategories, getAlbumGenres, getArtistGenres, getRegionsAndLanguages } from "@/lib/api-client"

// 获取歌单分类
async function fetchPlaylistCategories() {
    try {
        const response = await getPlaylistCategories()
        console.log("歌单分类:", response)
        return response
    } catch (error) {
        console.error("获取歌单分类失败:", error)
    }
}

// 获取专辑分类
async function fetchAlbumGenres() {
    try {
        const response = await getAlbumGenres()
        console.log("专辑分类:", response)
        return response
    } catch (error) {
        console.error("获取专辑分类失败:", error)
    }
}

// 获取歌手分类
async function fetchArtistGenres() {
    try {
        const response = await getArtistGenres()
        console.log("歌手分类:", response)
        return response
    } catch (error) {
        console.error("获取歌手分类失败:", error)
    }
}

// 获取地区和语言
async function fetchRegionsAndLanguages() {
    try {
        const response = await getRegionsAndLanguages()
        console.log("地区和语言:", response)
        return response
    } catch (error) {
        console.error("获取地区和语言失败:", error)
    }
}

// 获取所有分类数据
async function fetchAllCategories() {
    const playlistCategories = await fetchPlaylistCategories()
    const albumGenres = await fetchAlbumGenres()
    const artistGenres = await fetchArtistGenres()
    const regionsAndLanguages = await fetchRegionsAndLanguages()

    return {
        playlistCategories,
        albumGenres,
        artistGenres,
        regionsAndLanguages,
    }
}

// 执行获取所有分类数据
fetchAllCategories()

